package com.company.management.config;

import com.company.management.config.rewads.FileConfigProperties;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * 装载yml配置文件
 */
@Component
@ConfigurationProperties(prefix = "custom")
@Data
public class CustomConfig {
    private String baseurl;
    private String avartar_folder;
    private String apks_folder;
    private static String domainUrl;
    private static String path;

    @PostConstruct
    public void init() {
        CustomConfig.path = this.apks_folder;
        CustomConfig.domainUrl = this.baseurl;
    }
    public static String getPath() {
        return path;
    }
    public static String getDomainUrl() {
        return domainUrl;
    }
}
